package com.ruoyi.cms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cms.mapper.CmsOrderMessageMapper;
import com.ruoyi.cms.domain.CmsOrderMessage;
import com.ruoyi.cms.service.ICmsOrderMessageService;

/**
 * 订单成功通知消息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-11
 */
@Service
public class CmsOrderMessageServiceImpl implements ICmsOrderMessageService 
{
    @Autowired
    private CmsOrderMessageMapper cmsOrderMessageMapper;

    /**
     * 查询订单成功通知消息
     * 
     * @param id 订单成功通知消息主键
     * @return 订单成功通知消息
     */
    @Override
    public CmsOrderMessage selectCmsOrderMessageById(Long id)
    {
        return cmsOrderMessageMapper.selectCmsOrderMessageById(id);
    }

    /**
     * 查询订单成功通知消息列表
     * 
     * @param cmsOrderMessage 订单成功通知消息
     * @return 订单成功通知消息
     */
    @Override
    public List<CmsOrderMessage> selectCmsOrderMessageList(CmsOrderMessage cmsOrderMessage)
    {
        return cmsOrderMessageMapper.selectCmsOrderMessageList(cmsOrderMessage);
    }

    /**
     * 新增订单成功通知消息
     * 
     * @param cmsOrderMessage 订单成功通知消息
     * @return 结果
     */
    @Override
    public int insertCmsOrderMessage(CmsOrderMessage cmsOrderMessage)
    {
        cmsOrderMessage.setCreateTime(DateUtils.getNowDate());
        return cmsOrderMessageMapper.insertCmsOrderMessage(cmsOrderMessage);
    }

    /**
     * 修改订单成功通知消息
     * 
     * @param cmsOrderMessage 订单成功通知消息
     * @return 结果
     */
    @Override
    public int updateCmsOrderMessage(CmsOrderMessage cmsOrderMessage)
    {
        cmsOrderMessage.setUpdateTime(DateUtils.getNowDate());
        return cmsOrderMessageMapper.updateCmsOrderMessage(cmsOrderMessage);
    }

    /**
     * 批量删除订单成功通知消息
     * 
     * @param ids 需要删除的订单成功通知消息主键
     * @return 结果
     */
    @Override
    public int deleteCmsOrderMessageByIds(Long[] ids)
    {
        return cmsOrderMessageMapper.deleteCmsOrderMessageByIds(ids);
    }

    /**
     * 删除订单成功通知消息信息
     * 
     * @param id 订单成功通知消息主键
     * @return 结果
     */
    @Override
    public int deleteCmsOrderMessageById(Long id)
    {
        return cmsOrderMessageMapper.deleteCmsOrderMessageById(id);
    }
}
